package com.briup.web.controller;

import com.briup.domain.User;
import com.briup.resuit.Result;
import com.briup.service.UserService;
import com.briup.utils.JwtUtil;
import com.briup.utils.MD5Util;
import com.briup.vo.loginParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@Api(tags = "登录模块")
@RestController
public class LoginController {
    @Autowired
    UserService userService;
    @ApiOperation("用户登录")
    @PostMapping("/login")
    public Result login(@RequestBody loginParam param){
        String login = userService.login(param);
        return Result.success(login);
    }
    @ApiOperation("用户登出")
    @PostMapping(value = "/logout")
    public Result logout(){
        return Result.success();
    }
}
